
#include "mainwindowactivator.h"
#include "../../src/imainwindow.h"
#include "mainwindowplugin.h"
#include <iostream>
MainWindowActivator::MainWindowActivator()
{
}

void MainWindowActivator::start(ctkPluginContext *context)
{
    std::cout <<  "core start" << std::endl;
    plugin_ = new MainWindowPlugin(context);

    ctkDictionary dic;
    context->registerService<iMainWindow>(plugin_, dic);
}

void MainWindowActivator::stop(ctkPluginContext *context)
{
    std::cout <<  "core stop" << std::endl;
    if(plugin_)
    {
        delete plugin_;
        plugin_ = nullptr;
    }
}